<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>分销设置</title>
    {template 'stourtravel/public/public_js'}
    {php echo Common::getCss('style.css,base.css'); }
    {php echo Common::getScript('config.js');}
    {php echo Common::getScript("uploadify/jquery.uploadify.min.js"); }
    {php echo Common::getCss('uploadify.css','js/uploadify/'); }
    <style>
       .ratio-sp{
           float:left;
           line-height: 24px;
           margin-left:3px;
       }
       .hint-sp{
           float:left;
           margin-left:15px;
           line-height: 24px;
           height:24px;
           color:#acacac;
       }
       .ver-item{
           float:left;
           margin-right: 10px;
       }
       .wx-tit{
           width:80px;
           text-align: right;
       }
    </style>
</head>

<body>
	<table class="content-tab">
    <tr>
    <td width="119px" class="content-lt-td"  valign="top">
     {template 'stourtravel/public/leftnav'}
    <!--右侧内容区-->
    </td>
     <td valign="top" class="content-rt-td">
        <!--面包屑-->

      <div>
        <form id="frm">
         <div class="w-set-con">
        	<div class="w-set-tit bom-arrow"><span class="on"><s></s>分销配置</span> <span><s></s>微信配置</span>  <a href="javascript:;" class="refresh-btn" onclick="window.location.reload()">刷新</a></div>
          <div class="w-set-nr">

              <div class="picture ml-10">
                  <p><span class="fl">分销商自动审核开关：</span>
                      <span class="ver-item"><input name="cfg_fenxiao_autoverify" {if $info['cfg_fenxiao_autoverify']==1}checked="checked"{/if} type="radio" value="1"/>开启</span>
                      <span class="ver-item"><input name="cfg_fenxiao_autoverify" {if $info['cfg_fenxiao_autoverify']==0}checked="checked"{/if} type="radio" value="0"/>关闭</span>
                    <span class="hint-sp">*开启：会员申请成为分销商，系统自动通过。关闭：需要后台管理人员进行分销商审核通过</span></p>
                  <p><span class="fl">分销商自动冻结开关：</span>
                      <span class="ver-item"><input name="cfg_fenxiao_autofreeze" type="radio" {if $info['cfg_fenxiao_autofreeze']==1}checked="checked"{/if} value="1"/>开启</span>
                      <span class="ver-item"><input name="cfg_fenxiao_autofreeze" type="radio" {if $info['cfg_fenxiao_autofreeze']==0}checked="checked"{/if} value="0"/>关闭</span>
                      <span class="ver-item">超过 <input type="text" class="set-text-xh w50" style="float:none" name="cfg_fenxiao_freeze_duration" value="{$info['cfg_fenxiao_freeze_duration']}"/> 个小时未登录分销商中心，则自动冻结该分销商。</span>
                      <span class="hint-sp"></span>
                  </p>
              </div>
              <div class="picture ml-10" style="display: none">
                  <p><span class="fl wx-tit">APPID：</span>
                      <span class="ver-item"><input name="cfg_fenxiao_wx_appid"  type="text" class="set-text-xh w200"  value="{$info['cfg_fenxiao_wx_appid']}"/></span>
                      <span class="hint-sp">*微信公众号APPID</span></p>
                  <p><span class="fl wx-tit">APPSECRET：</span>
                      <span class="ver-item"><input name="cfg_fenxiao_wx_appsecret"  type="text" class="set-text-xh w300"  value="{$info['cfg_fenxiao_wx_appsecret']}"/></span>
                      <span class="hint-sp">*微信公众号APPSECRET</span>
                  </p>
                  <p><span class="hint-sp">请先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”,域名为当前使用微信分享功能的网站域名，例如lvyou.com</span></p>
                  <span class="hint-sp" style="color: red">*注意在配置时不能加域名前缀，如www等</span>
              </div>

            <div class="opn-btn">
            	<a class="normal-btn ml-10" href="javascript:;" id="btn_save">保存</a>
            </div>
          </div>
        </div>
        </form>
      </div>
  </td>
  </tr>
  </table>

  
  
	<script>

	$(document).ready(function(){


        $(".w-set-tit span").click(function(){
               $(this).siblings().removeClass('on');
               $(this).addClass('on');
               var index=$(this).index();
               $(".w-set-nr .picture").hide().eq(index).show();
        })



        //配置信息保存
        $("#btn_save").click(function(){
            Ext.Ajax.request({
                url   :  SITEURL+"fenxiao/ajax_config_save",
                method  :  "POST",
                isUpload :  true,
                form  : "frm",
                success  :  function(response, opts)
                {
                    var data = $.parseJSON(response.responseText);
                    if(data.status)
                    {
                        ST.Util.showMsg('保存成功!','4',2000);
                    }
                }
            });
        })
     });
    </script>

</body>
</html>
